package com.lyl.security.module.security.model.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author Mr.Luo
 * @date 2022-09-13 15:37
 * @desc
 */
@Data
@ConfigurationProperties(prefix = "security")
public class SecurityProperties {
    public static final InnerToken DEFAULT_TOKEN = new InnerToken();
    /**
     * 需要排除的urls
     */
    private String[] excludeUrls;

    /**
     * token相关
     */
    private InnerToken token = DEFAULT_TOKEN;

    @Data
    public static class InnerToken {
        /**
         * 过期时间（分钟）
         */
        private int expiredTime = 30;

        /**
         * 令牌密钥
         */
        private String secret;

        /**
         * 令牌请求头名称
         */
        private String header = "Authorization";
    }
}
